1. Field of the Invention
The present invention relates to a method of rewriting a control program stored in a flash EEPROM and an on-board electronic device that uses the method of rewriting.
2. Description of the Related Art
JP-A-Hei 11-175331 and JP-A 2001-265601 disclose on-board electronic control devices for controlling vehicle equipment such as an engine or a gear transmission system. Such a device includes a rewritable flash EEPROM so as to be able to rewrite the control program stored in the flash EEPROM even after the vehicle is put on the market.
This kind of on-board electronic device normally controls vehicle equipment such as an engine or a gear transmission system according to a control program that is already stored in the flash EEPROM. When a rewriting command signal is sent from an outside rewriting device, the originally stored control program is rewritten with a new control program that is sent from the outside rewriting device. Thus, operation of vehicle equipment can be changed.
As shown in FIG. 5 of this application, when a rewriting command signal is sent to an on-board electronic device at step S302 while it is controlling vehicle equipment according to the original control program at S301, whether the on-board electronic device receives the rewriting command signal or not is examined at step S303. If the result of the examination is “Yes”, the control program is jumped to a flash EEPROM rewriting program at S304. After the original control program is changed to the flash EEPROM rewriting program at S401, a microcomputer is controlled under an initial condition after being reset to rewrite the flash EEPROM at S402.
When the flash EEPROM that is included in a microcomputer is to be rewritten, the flash EEPROM rewriting program starts, so that the microcomputer is reset to be under the initial condition, so that the microcomputer cannot be operated by a user. Although it is desirable that the vehicle equipment can be continuously controlled by the on-board electronic device while the flash EEPROM rewriting program is operating, such a control is impossible. For example, once the flash EEPROM rewriting program operates, a low level output signal cannot be continuously supplied to the port of the microcomputer, resulting in that a user cannot operate the vehicle equipment that is connected to the microcomputer.